package com.yunji.order.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yunji.common.base.BaseDO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * @author : peter-zhu
 * @date : 2025/3/12 13:40
 * @description : TODO
 **/
@TableName("t_order_detail")
@EqualsAndHashCode(callSuper = true)
@Data
public class OrderDetailDO extends BaseDO {

    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "订单明细ID")
    private Long orderDetailId;

    @ApiModelProperty("订单ID")
    private Long orderId;

    @ApiModelProperty(value = "订单流水号")
    private String orderCode;

    @ApiModelProperty(value = "订单所属ID")
    private Long belongId;

    @ApiModelProperty("商品ID")
    private Long productId;

    @ApiModelProperty("商品名称")
    private String productName;

    @ApiModelProperty("商品数量")
    private Integer productNums;

    @ApiModelProperty("sku")
    private String sku;

    @ApiModelProperty("商品类型")
    private Integer productType;

    @ApiModelProperty("商品类型名称")
    private String productTypeName;

    @ApiModelProperty("商品单位")
    private Long productUnits;

    @ApiModelProperty("商品描述")
    private String subTitle;

    @ApiModelProperty("商品图片")
    private String albumPics;

    @ApiModelProperty("原销售价")
    private BigDecimal price;

    @ApiModelProperty("原销售单价")
    private BigDecimal unitPrice;

    @ApiModelProperty("成本总价")
    private BigDecimal costPrice;

    @ApiModelProperty("成本单价")
    private BigDecimal costUnitPrice;

    @ApiModelProperty("网点销售总价")
    private BigDecimal siteSalePrice;

    @ApiModelProperty("网点销售单价")
    private BigDecimal unitSalePrice;

    @ApiModelProperty("应收金额")
    private BigDecimal payableAmount;

    @ApiModelProperty("应收单价金额")
    private BigDecimal payableUnitAmount;

    public OrderDetailDO(){}
    public OrderDetailDO(Long productId, Integer productNums) {
        this.productId = productId;
        this.productNums = productNums;
    }
}
